<?php


namespace app\admin\validate;


use app\common\validate\BaseValidate;

class Good extends BaseValidate
{
    protected $rule = [
        'good_name|商品名称' => 'require',
        'good_img|商品封面' => 'require',
        'good_num|商品库存' => 'require|number',
        'integral|积分' => 'require'
    ];
    protected $scene = [
        'add' => ['good_name', 'good_img', 'integral'],
        'edit' => ['good_name', 'good_img', 'integral']
    ];
}